package com.service;

import com.entity.Dept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@FeignClient(name = "my-provider",fallbackFactory = DeptServiceFallbackFactory.class)
@RequestMapping("/dept")
public interface DeptService {
	@RequestMapping("/add")
	 boolean addDept(Dept dept); //添加一个部门
	@RequestMapping("/get/{id}")
	 Dept queryById(@PathVariable(value = "id")  Long id); //根据id查询部门
	@RequestMapping("/list")
	 List<Dept> queryAll(); //查询所有部门
}
